package com.maxlen.order.service;

import com.alipay.api.AlipayApiException;
import com.baomidou.mybatisplus.extension.service.IService;
import com.maxlen.common.utils.PageUtils;
import com.maxlen.common.utils.R;
import com.maxlen.order.entity.OrderEntity;
import com.maxlen.order.entity.dto.OrderSubmitDTO;
import com.maxlen.order.entity.vo.OrderAllVO;

import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author MaxLen
 * @email MaxLen@gmail.com
 * @date 2022-10-27 10:57:48
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    R confirmOrder();

    R setSubmitOrder(OrderSubmitDTO orderSubmitDTO);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    R getOrderTimeByOrderSn(String orderSn);

    R ZFBPay(String orderSn) throws AlipayApiException;

    OrderAllVO getOrder(Integer status) throws ExecutionException, InterruptedException;

    R deleteOrder(String orderSn);

    void changeStatus(String id, Integer status);
}

